\documentclass{article}
\usepackage{pstricks-add}
\pagestyle{empty}
\begin{document}    

%%%%%%%%%

\pspicture(0,0)(10,3)

\psframe(0,0)(10,-0.5) % text
\psline{<->}(4.5,0.25)(10,0.25)
\uput[90](7,0.25){$a_1$}
\uput[180](0,-0.25){$T$}

\psframe(3,-0.5)(6,-1) %pattern
\psline{<->}(6,-0.75)(10,-0.75)
\uput[-90](8,-0.75){$a_2$}
\uput[180](3,-0.75){$P$}

\psframe(4,0)(4.5,-1) %pos
\uput[90](4.25,0){$i$}

\endpspicture

%%%%%%%%%

\pspicture(0,0)(10,6)

\psframe(0,0)(10,-0.5) % text
\uput[180](0,-0.25){$T$}

\psframe(3,-0.5)(8,-1) %pattern
\uput[0](8,-0.75){$P$}
\psbrace[rot=90, nodesepB=10pt](3,-1)(6,-1){$p_q$}%
\psline[linestyle=dashed]{->}(7,-1.5)(6.25,-0.75)
\psline[linestyle=dashed]{->}(7,-1.5)(6.25,-0.25)
\uput[0](7,-1.5){mismatch}

\psframe(5,-2.5)(9.5,-3) %pattern verschoben
\uput[0](9.5,-2.75){$P$}
\psbrace[rot=90, nodesepB=10pt](5,-3)(6,-3){$p_k$}%
\psframe(5,-2.5)(6,-3)

\psframe(6,0)(6.5,-1) %pos
\uput[90](6.25,0){$i$}

\psline{<->}(3,0.25)(6,0.25)
\uput[90](4.75,0.25){$q$}

\psline[linestyle=dashed,linecolor=gray](3,1)(3,-4)
\psline[linestyle=dashed,linecolor=gray](5,1)(5,-4)
\psbrace[rot=90, nodesepA=-70pt, nodesepB=10pt](3,-4)(5,-4){Verschiebung um $q - \pi(q) = q - k$}%

\uput[0](5.5,-2){identisch}
\psline[linestyle=dashed]{<->}(5.5,-2.75)(5.5,-0.75)

\endpspicture

%%%%%%%%%

\pspicture(0,0)(10,6)

\psframe(0,0)(10,-0.5) % text
\psline{<->}(5.5,0.25)(10,0.25)
\uput[90](7.5,0.25){$a_1$}
\uput[180](0,-0.25){$P$}

\psframe(3,-0.5)(13,-1) %pattern
\psline{<->}(0,-0.75)(3,-0.75)
\uput[-90](1.5,-0.75){$a_2$}
\uput[0](13,-0.75){$P$}

\psframe(5,0)(5.5,-1) %pos
\uput[90](5.25,0){$q$}
\psframe(4.5,-0.5)(5,-1) %pos
\uput[-90](5.1,-1){$k, k+1$}

\endpspicture

\end{document}